const express = require('express');
const router = express.Router();

// 引入控制器
const WarehousingController = require('../controller/WarehousingController');
const warehousingController = new WarehousingController();

// 入库管理-入库列表
// router.get('/', (req,res)=>UsersController.getUsers(req, res));
router.get('/getInventoryinList', (req,res)=>{
    return warehousingController.getInventoryinList(req,res);
});

// 入库管理-新增入库
router.post('/AddInventoryin', (req,res)=>{
    return warehousingController.AddInventoryin(req,res);
});
// 入库管理-添加入库详情
router.post('/AddInventoryinItem', (req,res)=>{
    return warehousingController.AddInventoryinItem(req,res);
});
// 入库管理-根据id获取订单详情
router.get('/GetInventoryinDetail', (req,res)=>{
    return warehousingController.GetInventoryinDetail(req,res);
});

// 入库管理-更新入库
router.put('/UpdateInventoryin/:id', (req,res)=>{
    return warehousingController.UpdateInventoryin(req,res);
});
// 查询对应的商品信息
router.post('/GetGoodsOrder/:id', (req,res)=>{
    return warehousingController.GetGoodsOrder(req,res);
});
// 入库管理-删除入库
router.put('/DeleteInventoryin/:id', (req,res)=>{
    return warehousingController.DeleteInventoryin(req,res);
});

// 根据采购订单的id获取采购订单详情
router.get('/GetGoodsOrderDetail', (req,res)=>{
    return warehousingController.GetGoodsOrderDetail(req,res);
});

// 根据用户ID来获取用户名
router.get('/GetUserName', (req,res)=>{
    return warehousingController.GetUserName(req,res);
});

module.exports = router;